package com.supersit.greensproject.entity;

import com.supersit.greensproject.application.MyApplication;

import org.xutils.DbManager;
import org.xutils.db.annotation.Column;
import org.xutils.db.annotation.Table;
import org.xutils.ex.DbException;

import java.io.Serializable;

/**
 * 蔬菜检测
 * Created by cong on 2016/7/20.
 */
@Table(name = "VegetableChekc")
public class VegetableChekc implements Serializable {
    @Column(name = "id", isId = true)
    private int id;
    private int baseId;//基地ID
    private String createDate;
    private String productName;//产品名称
    private String productnum;//产品编号
    private double cr;//铬数量
    private int crResult;//铬检测结果 0合格 1不合格
    private double hg;//汞数量
    private int hgResult;//汞检测结果 0合格 1不合格
    private double as;//砷数量
    private int asResult;//砷检测结果 0合格 1不合格
    private double f;//氟数量
    private int fResult;//氟检测结果 0合格 1不合格
    private double pb;//铅数量
    private int pbResult;//铅检测结果 0合格 1不合格
    private int productType;//0蔬菜 1肉鸡 2奶牛 3渔业 4生猪


    public BaseBase getBase(DbManager db) throws DbException {
        return db.selector(BaseBase.class).where("id", "=", this.baseId).findFirst();
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getBaseId() {
        return baseId;
    }

    public void setBaseId(int baseId) {
        this.baseId = baseId;
    }

    public String getCreateDate() {
        return createDate;
    }

    public void setCreateDate(String createDate) {
        this.createDate = createDate;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getProductnum() {
        return productnum;
    }

    public void setProductnum(String productnum) {
        this.productnum = productnum;
    }

    public double getCr() {
        return cr;
    }

    public void setCr(double cr) {
        this.cr = cr;
    }

    public int getCrResult() {
        return crResult;
    }

    public void setCrResult(int crResult) {
        this.crResult = crResult;
    }

    public double getHg() {
        return hg;
    }

    public void setHg(double hg) {
        this.hg = hg;
    }

    public int getHgResult() {
        return hgResult;
    }

    public void setHgResult(int hgResult) {
        this.hgResult = hgResult;
    }

    public double getAs() {
        return as;
    }

    public void setAs(double as) {
        this.as = as;
    }

    public int getAsResult() {
        return asResult;
    }

    public void setAsResult(int asResult) {
        this.asResult = asResult;
    }

    public double getF() {
        return f;
    }

    public void setF(double f) {
        this.f = f;
    }

    public int getfResult() {
        return fResult;
    }

    public void setfResult(int fResult) {
        this.fResult = fResult;
    }

    public double getPb() {
        return pb;
    }

    public void setPb(double pb) {
        this.pb = pb;
    }

    public int getPbResult() {
        return pbResult;
    }

    public void setPbResult(int pbResult) {
        this.pbResult = pbResult;
    }

    public int getProductType() {
        return productType;
    }

    public void setProductType(int productType) {
        this.productType = productType;
    }

    @Override
    public String toString() {
        return "VegetableChekc{" +
                "id=" + id +
                ", baseId=" + baseId +
                ", createDate='" + createDate + '\'' +
                ", productName='" + productName + '\'' +
                ", productnum='" + productnum + '\'' +
                ", cr=" + cr +
                ", crResult=" + crResult +
                ", hg=" + hg +
                ", hgResult=" + hgResult +
                ", as=" + as +
                ", asResult=" + asResult +
                ", f=" + f +
                ", fResult=" + fResult +
                ", pb=" + pb +
                ", pbResult=" + pbResult +
                ", productType=" + productType +
                '}';
    }
}
